﻿<?php
$categoryname="0";
$pname = $_POST['pname']; 
$department = $_POST['participation'];   
for($i=0;$i<count($department);$i++)
{
$categoryname=$categoryname.",".$department[$i];
//echo $weeks[$i]."<br>";
}
echo "<script>window.opener.document.save.".$pname.".value='".str_replace("0,"," ",$categoryname)."';</script>";
//echo '您选择了'.str_replace("0,"," ",$categoryname).'';
echo '<script language="JavaScript">window.close()</script>';
?>

